#pragma once
#include <HPSocket.h>
#include <Tcp.h>

class CTcpAgentListenerImpl : public CTcpAgentListener
{
public:
	CTcpAgentListenerImpl();
private:
	virtual EnHandleResult OnSend(ITcpAgent *pSender, CONNID dwConnID, const BYTE *pData, int iLength);
	virtual EnHandleResult OnReceive(ITcpAgent *pSender, CONNID dwConnID, const BYTE *pData, int iLength);
	virtual EnHandleResult OnClose(ITcpAgent *pSender, CONNID dwConnID, EnSocketOperation enOperation, int iErrorCode);
	virtual EnHandleResult OnConnect(ITcpAgent *pSender, CONNID dwConnID);
	virtual EnHandleResult OnShutdown(ITcpAgent *pSender);

private:
	void DetachConnInfo(CONNID dwConnID);
public:
};